<html>

<head>
    <meta charset="UTF-8">
    <script>
        function abccc() {
            alert("1111111");
        }
        function aaa(aa) {
            console.log(aa);
        }

        function eee(aa) {
            console.log(aa);
        }

        function getPosition() {
            var x = navigator.geolocation
            if (x) {
                alert("用户允许访问");

                navigator.geolocation.getCurrentPosition(aaa, eee)

            }
            else {

                alert("不允许访问")
            }
        }
    </script>
</head>

<body>
    <button onclick="abcc()">aaa</button>
    <p>111111</p>
</body>

</html>